﻿namespace dogd
{
	using System;
	using System.Runtime.Serialization;

	/// <summary>
	/// General purpose exception thrown by SqliteRepository
	/// </summary>
	[Serializable]
	public class PersistenceException : Exception
	{
		/// <summary>
		/// Initializes a new instance of the PersistenceException class
		/// </summary>
		public PersistenceException()
			: base()
		{
		}

		/// <summary>
		/// Initializes a new instance of the PersistenceException class with the provided message
		/// </summary>
		/// <param name="message"></param>
		public PersistenceException(string message)
			: base(message)
		{
		}

		/// <summary>
		/// Initializes a new instance of the PersistenceException class with serialized data.
		/// </summary>
		/// <param name="info"></param>
		/// <param name="context"></param>
		protected PersistenceException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		/// <summary>
		/// Initializes a new instance of the PersistenceException class with a specified
		/// error message and a reference to the inner exception that is the cause of
		/// this exception.
		/// </summary>
		/// <param name="message"></param>
		/// <param name="innerException"></param>
		public PersistenceException(string message, Exception innerException)
			: base(message, innerException)
		{
		}
	}
}
